package com.movie.ticket.sale.cinema.assembly.cinemaassembly.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.movie.ticket.sale.cinema.assembly.cinemaassembly.info.*;
import com.movie.ticket.sale.moviecommon.model.TCinemaMovie;
import com.movie.ticket.sale.moviecommon.model.TUser;
import com.movie.ticket.sale.test.User;
import org.springframework.stereotype.Service;

import java.util.List;

public interface CinemaService {



    User test(User user);

    User find(int id);

    List<MovieAcountInfo> findMovieNameById(int cinemaId);

    IPage<MovieOrderInfo> findTicketOrder(Page<MovieOrderInfo> page, int cinemaId,String tradeNuo);

    IPage<VipOrderInfo> findVipOrder(Page<VipOrderInfo> page, int cinemaId,String tradeNuo);

    CinemaState findCinemaStateById(int cinemaId);

    IPage<MovieDataInfo> findAllMovies(Page<MovieDataInfo> page, String name);

    IPage<MovieDataInfo> findCinemaMovie(Page<MovieDataInfo> page,int cinemaId, String name);

    void pullMovie(TCinemaMovie tCinemaMovie);

    List<CinemaMovieInfo> isExist(int movieId,int cinemaId);

    MovieDataInfo findMovieById(int movieId);

    void soldOutCinemaMovie(int movieId,int cinemaId);

    void putawayCinemaMovie(int movieId,int cinemaId);

    IPage<AuditoriumInfo> findAuditorium(Page<AuditoriumInfo> page, int cinemaId, String type);

    void addAuditorium(AuditoriumInfo auditoriumInfo);

    AuditoriumInfo findAuditoriumById(int id);

    void updateAuditorium(AuditoriumInfo auditoriumInfo);

    void addVip(VipInfo vipInfo);

    int findParentCinema(int cinemaId);

    IPage<VipInfo> findVip(Page<VipInfo> page, int cinemaId, Integer state);

    void updateVip(VipInfo vip);

    void delVip(int id);

    List<UserInfo> isUse(int cinemaId,int auditoriumId);

    void addPlan(PeridInfo peridInfo);

    IPage<PeridInfo> findPlan(Page<PeridInfo> page,int cinemaId, Integer state, Integer auditoriumId, Integer movieId);

    void updatePlan(PeridInfo info);

    List<PeridStateInfo> findPeridState();

    void updatePerid(int id,int state);

    void delPlan(int id);

    CinemaInfo annualCost(int id);

    void updateCinemaData(int cinemaId,String tel,String name,String address,String service);

    void updateCinemaFilePath(CinemaDataInfo cinemaDataInfo);

    int findCinemaDataId(int cinemaId,int type);

    void closeCinema(int cinemaId);

    void signIn(String checkCode);

    List<Integer> isSignIn(String checkCode);
//=====================================
    List<AutoOrderInfo> findAllOrder();

    int findperidState(int peridId);

    void finishOrder(int id, int state);

    void addBoxOffice(int id,double boxOffice);

}
